import React, { useState } from 'react'
import './index.css'

function Counter() {
  const [count, setCount] = useState(0)


    const data2 = [
        {
            mode: 'scaleToFill',
            text: 'scaleToFill：不保持纵横比缩放图片，使图片完全适应',
            src: "http://e.hiphotos.baidu.com/image/pic/item/a1ec08fa513d2697e542494057fbb2fb4316d81e.jpg"
        }, {
            mode: 'aspectFit',
            text: 'aspectFit：保持纵横比缩放图片，使图片的长边能完全显示出来',
            src: "http://c.hiphotos.baidu.com/image/pic/item/30adcbef76094b36de8a2fe5a1cc7cd98d109d99.jpg"
        }, {
            mode: 'aspectFill',
            text: 'aspectFill：保持纵横比缩放图片，只保证图片的短边能完全显示出来',
            src: "http://a.hiphotos.baidu.com/image/pic/item/8d5494eef01f3a292d2472199d25bc315d607c7c.jpg"
        }, {
            mode: 'top',
            text: 'top：不缩放图片，只显示图片的顶部区域',
            src: "http://b.hiphotos.baidu.com/image/pic/item/359b033b5bb5c9ea5c0e3c23d139b6003bf3b374.jpg"
        }, {
            mode: 'bottom',
            text: 'bottom：不缩放图片，只显示图片的底部区域',
            src: "http://g.hiphotos.baidu.com/image/pic/item/0d338744ebf81a4c87a3add4d52a6059252da61e.jpg"
        }, {
            mode: 'center',
            text: 'center：不缩放图片，只显示图片的中间区域',
            src: "http://a.hiphotos.baidu.com/image/pic/item/f2deb48f8c5494ee5080c8142ff5e0fe99257e19.jpg"
        }, {
            mode: 'left',
            text: 'left：不缩放图片，只显示图片的左边区域',
            src: "http://f.hiphotos.baidu.com/image/pic/item/4034970a304e251f503521f5a586c9177e3e53f9.jpg"
        }, {
            mode: 'right',
            text: 'right：不缩放图片，只显示图片的右边边区域',
            src: "http://b.hiphotos.baidu.com/image/pic/item/279759ee3d6d55fbb3586c0168224f4a20a4dd7e.jpg"
        }, {
            mode: 'top left',
            text: 'top left：不缩放图片，只显示图片的左上边区域',
            src: "http://a.hiphotos.baidu.com/image/pic/item/e824b899a9014c087eb617650e7b02087af4f464.jpg"
        }, {
            mode: 'top right',
            text: 'top right：不缩放图片，只显示图片的右上边区域',
            src: "http://c.hiphotos.baidu.com/image/pic/item/9c16fdfaaf51f3de1e296fa390eef01f3b29795a.jpg"
        }, {
            mode: 'bottom left',
            text: 'bottom left：不缩放图片，只显示图片的左下边区域',
            src: "http://d.hiphotos.baidu.com/image/pic/item/b58f8c5494eef01f119945cbe2fe9925bc317d2a.jpg"
        }, {
            mode: 'bottom right',
            text: 'bottom right：不缩放图片，只显示图片的右下边区域',
            src: "http://h.hiphotos.baidu.com/image/pic/item/902397dda144ad340668b847d4a20cf430ad851e.jpg"
        }
    ]


    const data1 = [
        {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112114/df31c411-822e-45d1-b30d-0ed4bdb57419.jpg.thumb.jpg",
        }, {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112115/df9ed257-3a0c-49dc-a279-ca1b4b2392fc.png.thumb.jpg",
        }, {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112111/5925ecf3-968e-4890-8260-68b0b9a00750.jpg.thumb.jpg",
        }, {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-obs/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023071315/e3167bcb-8692-4a1d-812f-bafc207cec6b.png.thumb.jpg",
        }, {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-obs/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023052217/457a522f-0e67-4fa3-9ce5-8b81af9f9902.jpeg.thumb.jpg",
        }, {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-obs/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023071315/6a324087-f683-4e3f-ae8c-22c9389387ee.png.thumb.jpg",
        }, {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112114/9df50fc2-5288-435e-8e62-d1b290761fdb.jpg.thumb.jpg",
        }, {
            "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112114/cc1eec4a-774b-4df5-b8da-67c78672d7e2.jpeg.thumb.jpg",
        }
    ]


    // 用友开发者中心的的图片
    const data3 =[
        {
            "src": "https://developer.yonyou.com/img/home/platform.png",
        }, {
            "src": "https://developer.yonyou.com/img/home/resources3/img1.jpg",
        }, {
            "src": "https://developer.yonyou.com/img/home/resources3/img2.jpg",
        }, {
            "src": "https://developer.yonyou.com/img/home/resources3/img3.jpg",
        }, {
            "src": "https://developer.yonyou.com/img/home/resources3/img4.jpg",
        }, {
            "src": "https://developer.yonyou.com/img/home/resources3/img5.jpg",
        }, {
            "src": "https://developer.yonyou.com/img/home/resources3/img6.jpg",
        }, {
            "src": "https://developer.yonyou.com/img/home/resources3/img7.jpg",
        }
    ]


    return (
    // <div>
    //   <button onClick={() => setCount(count - 1)}>-</button>
    //   <span>{count}</span>
    //   <button onClick={() => setCount(count + 1)}>+</button>
    //   <button onClick={clickHandle}>跳转</button>
    // </div>
<div>
    {/*<scroll-view type="list" style="height: 100%;width: 100vw;" scroll-y="true">*/}
    {/*    {*/}
    {/*        data1.map((item) => {*/}
    {/*            return <div>*/}
    {/*                <image style={{height: '500px'}}  alt={item.text} src={item.src} mode='scaleToFill' lazy-load />*/}
    {/*                /!*<img style="width: 200px; height: 300px; background-color: #eeeeee;" mode="scaleToFill" alt={item.text} src={item.src} />*!/*/}
    {/*            </div>*/}
    {/*        })*/}
    {/*    }*/}
    {/*</scroll-view>*/}

    <scroll-view>
            {
                data1.map((item) => {
                    return <div>
                        <img style={{height: '500px'}}  alt={item.src} src={item.src} mode='scaleToFill' lazy-load="{{true}}" />
                    </div>
                })
            }

        <div>111121</div>

    </scroll-view>

</div>

  )
}

function clickHandle() {
  if ('undefined' != typeof wx && wx.getSystemInfoSync) {
    wx.navigateTo({
      url: '../log/index?id=1',
    })
  } else {
    location.href = 'log.html'
  }
}

export default Counter


// export default function Index() {
//     const data2 = [
//         {
//             mode: 'scaleToFill',
//             text: 'scaleToFill：不保持纵横比缩放图片，使图片完全适应',
//             src: "http://e.hiphotos.baidu.com/image/pic/item/a1ec08fa513d2697e542494057fbb2fb4316d81e.jpg"
//         }, {
//             mode: 'aspectFit',
//             text: 'aspectFit：保持纵横比缩放图片，使图片的长边能完全显示出来',
//             src: "http://c.hiphotos.baidu.com/image/pic/item/30adcbef76094b36de8a2fe5a1cc7cd98d109d99.jpg"
//         }, {
//             mode: 'aspectFill',
//             text: 'aspectFill：保持纵横比缩放图片，只保证图片的短边能完全显示出来',
//             src: "http://a.hiphotos.baidu.com/image/pic/item/8d5494eef01f3a292d2472199d25bc315d607c7c.jpg"
//         }, {
//             mode: 'top',
//             text: 'top：不缩放图片，只显示图片的顶部区域',
//             src: "http://b.hiphotos.baidu.com/image/pic/item/359b033b5bb5c9ea5c0e3c23d139b6003bf3b374.jpg"
//         }, {
//             mode: 'bottom',
//             text: 'bottom：不缩放图片，只显示图片的底部区域',
//             src: "http://g.hiphotos.baidu.com/image/pic/item/0d338744ebf81a4c87a3add4d52a6059252da61e.jpg"
//         }, {
//             mode: 'center',
//             text: 'center：不缩放图片，只显示图片的中间区域',
//             src: "http://a.hiphotos.baidu.com/image/pic/item/f2deb48f8c5494ee5080c8142ff5e0fe99257e19.jpg"
//         }, {
//             mode: 'left',
//             text: 'left：不缩放图片，只显示图片的左边区域',
//             src: "http://f.hiphotos.baidu.com/image/pic/item/4034970a304e251f503521f5a586c9177e3e53f9.jpg"
//         }, {
//             mode: 'right',
//             text: 'right：不缩放图片，只显示图片的右边边区域',
//             src: "http://b.hiphotos.baidu.com/image/pic/item/279759ee3d6d55fbb3586c0168224f4a20a4dd7e.jpg"
//         }, {
//             mode: 'top left',
//             text: 'top left：不缩放图片，只显示图片的左上边区域',
//             src: "http://a.hiphotos.baidu.com/image/pic/item/e824b899a9014c087eb617650e7b02087af4f464.jpg"
//         }, {
//             mode: 'top right',
//             text: 'top right：不缩放图片，只显示图片的右上边区域',
//             src: "http://c.hiphotos.baidu.com/image/pic/item/9c16fdfaaf51f3de1e296fa390eef01f3b29795a.jpg"
//         }, {
//             mode: 'bottom left',
//             text: 'bottom left：不缩放图片，只显示图片的左下边区域',
//             src: "http://d.hiphotos.baidu.com/image/pic/item/b58f8c5494eef01f119945cbe2fe9925bc317d2a.jpg"
//         }, {
//             mode: 'bottom right',
//             text: 'bottom right：不缩放图片，只显示图片的右下边区域',
//             src: "http://h.hiphotos.baidu.com/image/pic/item/902397dda144ad340668b847d4a20cf430ad851e.jpg"
//         }
//     ]
//
//
//     const data1 = [
//         {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112114/df31c411-822e-45d1-b30d-0ed4bdb57419.jpg.thumb.jpg",
//         }, {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112115/df9ed257-3a0c-49dc-a279-ca1b4b2392fc.png.thumb.jpg",
//         }, {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112111/5925ecf3-968e-4890-8260-68b0b9a00750.jpg.thumb.jpg",
//         }, {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-obs/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023071315/e3167bcb-8692-4a1d-812f-bafc207cec6b.png.thumb.jpg",
//         }, {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-obs/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023052217/457a522f-0e67-4fa3-9ce5-8b81af9f9902.jpeg.thumb.jpg",
//         }, {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-obs/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023071315/6a324087-f683-4e3f-ae8c-22c9389387ee.png.thumb.jpg",
//         }, {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112114/9df50fc2-5288-435e-8e62-d1b290761fdb.jpg.thumb.jpg",
//         }, {
//             "src": "https://ykj-open-api-test.yonyoucloud.com/iuap-apcom-file-public/iuap-apcom-file/0000LF93VS7M2AAA6D0000/2023112114/cc1eec4a-774b-4df5-b8da-67c78672d7e2.jpeg.thumb.jpg",
//         }
//     ]
//
//
//     // 用友开发者中心的的图片
//     const data3 =[
//         {
//             "src": "https://developer.yonyou.com/img/home/platform.png",
//         }, {
//             "src": "https://developer.yonyou.com/img/home/resources3/img1.jpg",
//         }, {
//             "src": "https://developer.yonyou.com/img/home/resources3/img2.jpg",
//         }, {
//             "src": "https://developer.yonyou.com/img/home/resources3/img3.jpg",
//         }, {
//             "src": "https://developer.yonyou.com/img/home/resources3/img4.jpg",
//         }, {
//             "src": "https://developer.yonyou.com/img/home/resources3/img5.jpg",
//         }, {
//             "src": "https://developer.yonyou.com/img/home/resources3/img6.jpg",
//         }, {
//             "src": "https://developer.yonyou.com/img/home/resources3/img7.jpg",
//         }
//     ]
//
//
//
//
//     return (
//         <scroll-view type="list" style="height: 100%;width: 100vw;" scroll-y="true">
//             {
//                 data1.map((item) => {
//                     return <div>
//                         <image style={{height: '500px'}}  alt={item.text} src={item.src} mode='scaleToFill' lazy-load />
//                         {/*<img style="width: 200px; height: 300px; background-color: #eeeeee;" mode="scaleToFill" alt={item.text} src={item.src} />*/}
//                     </div>
//                 })
//             }
//         </scroll-view>
//     )
// }
